/**
 * 
 * The MIT License
 * 
 * Copyright (c) 2008 the original author or authors.
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:

 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.

 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

package com.googlecode.gchartjava;

import java.util.List;

/**
 * Radar chart.
 * 
 * @see RadarPlot
 * @author Julien Chastang (julien.c.chastang at gmail dot com)
 *
 */
public class RadarChart implements GChart,GraphChart {
	
	private final PrivateRadarChart radarChart;
	
	/**
	 * Create radar chart.
	 * 
	 * @param plots
	 *            Plots to be rendered in this radar chart.
	 *            
	 * @see RadarPlot            
	 */
	public RadarChart(final RadarPlot... plots){
		radarChart = new PrivateRadarChart(plots);
	}	

	/**
	 * Create radar chart.
	 * 
	 * @param plots
	 *            Plots to be rendered in this plot chart.
	 *            
	 * @see RadarPlot            
	 */
	public RadarChart(final List<? extends RadarPlot> plots){
		radarChart = new PrivateRadarChart(plots);
	}	


	/**
	 * {@inheritDoc}
	 */
	public String createURLForHTML() {
		return radarChart.createURLForHTML();
	}

	/**
	 * {@inheritDoc}
	 */
	public String createURLString() {
		return radarChart.createURLString();
	}

	/**
	 * {@inheritDoc}
	 */
	public void setAreaFill(final Fill fill) {
		radarChart.setAreaFill(fill);
	}

	/**
	 * {@inheritDoc}
	 */
	public void setBackgroundFill(final Fill fill) {
		radarChart.setBackgroundFill(fill);
	}

	/**
	 * {@inheritDoc}
	 */
	public void setSize(final int x, final int y) {
		radarChart.setSize(x, y);
	}

	/**
	 * {@inheritDoc}
	 */
	public void setTitle(final String title) {
		radarChart.setTitle(title);
	}

	/**
	 * {@inheritDoc}
	 */
	public void setTitle(final String title, final Color color, final int fontSize) {
		radarChart.setTitle(title, color, fontSize);
	}
	
	/**
	 * Add "spoke" labels to radar plot.
	 * 
	 * @param axisInfo
	 *            Axis label information containing "spoke" labels.
	 *            
	 * @see AxisInfo
	 */
	public void addRadialAxisInfo(final AxisInfo axisInfo) {
		radarChart.addXAxisInfo(axisInfo);
	}
	
	/**
	 * Add "bull's eye" labels to radar plot.
	 * 
	 * @param axisInfo
	 *            Axis label information containing "bull's eye" labels.
	 *            
	 * @see AxisInfo
	 */
	public void addConcentricAxisInfo(final AxisInfo axisInfo) {
		radarChart.addYAxisInfo(axisInfo);
	}
	
	/**
	 * If true, points are connected with splines
	 * 
	 * @param isSpline
	 *            Are the points connected by splines.
	 */
	public void setSpline(final boolean isSpline) {
		radarChart.setSpline(isSpline);
	}

	/**
	 * {@inheritDoc}
	 */
	public void setDataEncoding(DataEncoding dataEncoding) {
		radarChart.setDataEncoding(dataEncoding);
	}
}
